//package com.atguigu.servicebase.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * @Author panghl
// * @Date 2021/2/7 16:48
// * @Description 解决跨域
// **/
////@Configuration
//public class CorsConfig implements WebMvcConfigurer {
////    @Override
////    public void addCorsMappings(CorsRegistry registry) {
////        // 允许跨域访问的路径
////        registry.addMapping("/**")
////                // 允许跨域访问的源
////                .allowedOrigins("http://localhost:3000","http://localhost:9528")
////                // 允许请求方法
////                .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
////                // 预检间隔时间
////                .maxAge(168000)
////                // 允许头部设置
////                .allowedHeaders("*")
////                // 是否发送cookie
////                .allowCredentials(true);
////    }
//
//}
